Skip to content

Conversation

@Kemi-Elizabeth
Copy link
Collaborator

Added app life cycle page (about hooks)

Why

Closes #5185

What's changed

New page has been added to Learn section about hooks and application lifecycle.

Where are changes

/learn/overview/app-life-cycle.html

Updates are for:

  • platform (sites/platform templates)
  • upsun (sites/upsun templates)

added app life cycle page
@Kemi-Elizabeth Kemi-Elizabeth self-assigned this Nov 7, 2025
@Kemi-Elizabeth Kemi-Elizabeth linked an issue Nov 7, 2025 that may be closed by this pull request
Automatically optimized images using optipng and jpegoptim via GitHub Actions
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Your Upsun Fixed environment has successfully deployed. 🚀

See the changed pages:

Upsun Fixed docs
Upsun docs

Copy link
Contributor

@tylers-username tylers-username left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kemi-Elizabeth - proposed a change

@Kemi-Elizabeth Kemi-Elizabeth dismissed stale reviews from tylers-username and ricardokirkner November 20, 2025 14:55

Addressed changes and adjusted content accordingly

- `start` blocks traffic until the application is running.
- `post_start` blocks traffic until all warm-up tasks complete.

Non-blocking hooks, such as `pre_start`, run before traffic concerns and do not affect when an instance begins receiving requests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically, the pre_start runs before the start, so if start blocks, then pre_start also does :/

@ralt
Copy link
Contributor

ralt commented Nov 26, 2025

Sorry for the late comment, but shouldn't this mention the deploy and post_deploy hooks, and how they relate to the start commands?

Kemi-Elizabeth and others added 5 commits November 26, 2025 15:32
Added more info as Florian suggested
Automatically optimized images using optipng and jpegoptim via GitHub Actions
Removed sentence starter for better readability
removed diagram
added new diagrams, changed text according to feedback from Florian
removed diagram

{{< /note >}}

## Web comannd use cases
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"comannd" should be "command"


- `start` blocks traffic until the application is running.
- `post_start` blocks traffic until all warm-up tasks complete.
- `pre_start` is non-blocking.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre_start is also blocking, I'd remove the whole distinction of non-blocking/blocking, they all block the deployment.

| Command | When to use | Example task |
| -------------- | ---------------------------------------- | ------------------------------------------- |
| **pre_start** | Per-instance setup before app launch | Preparing local caches, setting permissions |
| **post_start** | Warm-up before instance receives traffic | Cache priming, loading dependencies |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The typical example is rather "waiting for the application to be fully started"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New page to be added about hooks

7 participants